<template>
  <div class="news-item">
    <div class="news-info">
      <h3 class="news-title">{{ title }}</h3>
      <div class="news-hint">{{ hint }}</div>
    </div>
    <van-image width="70" height="70" fit="cover" :src="image" />
  </div>
</template>

<script>
export default {
  name: 'NewsItem',
  props: ['title', 'hint', 'image']
}
</script>

<style lang="less" scoped>
.news-item {
  background: #fff;
  box-sizing: border-box;
  padding: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  .news-info {
    flex: 1;
    margin-right: 10px;
    .news-title {
      margin: 0;
      margin-bottom: 10px;
      font-size: 17px;
      text-overflow: -o-ellipsis-lastline;
      overflow: hidden;
      text-overflow: ellipsis;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      line-clamp: 2;
      -webkit-box-orient: vertical;
      color: #000;
    }
    .news-hint {
      font-size: 13px;
      color: #888;
    }
  }
}
</style>
